using System;
using System.Data;
using System.Collections.Generic;
using System.Collections;
using log4net;
using FSS.BLL.Entities;
namespace FSS.BLL.Services
{
	#region DepartmentService

	/// <summary>
	/// DepartmentService object for Ibatis mapped table 'Department'.
	/// </summary>
	public class DepartmentService : IDepartmentService
	{
		private static readonly ILog log = LogManager.GetLogger(typeof(DepartmentService).Name);
	  	private static volatile DepartmentService _DepartmentService = null;
        public static DepartmentService GetInstance()
        {
            if (_DepartmentService == null)
            {
                lock (typeof(DepartmentService))
                {
                    if (_DepartmentService == null) // double-check
                        _DepartmentService = new DepartmentService();
                }
            }
            return _DepartmentService;
        }
		public DepartmentService()
        {
            //
            // TODO: Add constructor logic here
            //
        }
        public IList<DepartmentEntity> LoadAllExtra()
        {
            try
            {
                return ExecuteQueryForList<DepartmentEntity>("DepartmentLoadAllExtra", null);
            }
            catch (Exception ex)
            {
                log.Debug(ex.Message);
                return null;
            }
        }
	}
	#endregion  
}
